<template>
  <el-input-number
    :value="value"
    clearable
    controls-position="right"
    @input="handlerInput"
    @change="changeValied(formItem)"/>
</template>

<script>
export default {
  name: 'ValiInputNumber',
  model: {
    prop: 'value',
    event: 'input'
  },
  props: {
    value: {
      type: [String, Number],
      default: ''
    },
    formItem: {
      type: Object,
      default: () => ({})
    }
  },
  methods: {
    handlerInput(v) {
      this.$emit('input', v)
    },
    changeValied(item) {
      this.$emit('changeValied', item)
    }
  }
}
</script>
